package com.kay;


import com.kay.Utils.GetProperties;
import org.frameworkset.elasticsearch.ElasticSearchHelper;
import org.frameworkset.elasticsearch.client.ClientInterface;
import org.frameworkset.spi.BaseApplicationContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**刪除索引
 * Created by Kay on 2018/11/23
 */
public class DeleteIndex {
    private static Logger logger = LoggerFactory.getLogger(DeleteIndex.class);
    public static void main(String[] args) {
        Properties prop = GetProperties.GetProp();
            String deleteIndex = prop.getProperty("index").trim();
            ClientInterface clientUtil = ElasticSearchHelper.getRestClientUtil();
            clientUtil.deleteByPath(deleteIndex);
            BaseApplicationContext.shutdown();
    }
}
